package at.fhooe.im440.pandora.collision;

import java.awt.Color;
import java.awt.Graphics2D;

public abstract class CircleCollider {

	float m_X;
	float m_Y;
	float m_Radius;
	
	public CircleCollider(float x, float y, float rad)
	{
		m_X = x;
		m_Y = y;
		m_Radius = rad;
	}
	
	public void updateCollider(float x, float y)
	{
		m_X = x;
		m_Y = y;
	}
	
	public void updateCollider(float x, float y, float rad)
	{
		m_X = x;
		m_Y = y;
		m_Radius = rad;
	}
	
	public abstract void collided(CircleCollider col);

	public void drawCollider(Graphics2D g) {
		g.setColor(Color.magenta);
		g.drawArc((int)(m_X-m_Radius/2.0), (int)(m_Y-m_Radius/2.0), (int)m_Radius, (int)m_Radius, 0, 360);
	}

	public CircleCollider getCollisionObject() {
		return this;
	}
}
